extern crate net_brd;

use net_brd::log_utils;
use net_brd::db::LocalHost;

fn main(){
    log_utils::log_init();
    let db = "/tmp/test.db".db_in();
    log::info!("{}",db);
    let c = db.remove_host("localhost");
    log::info!("left c: {}",c);
    let _ = (1..1000).map(|x| db.add_host(&format!("chain://localhost:{}",x))).collect::<Vec<_>>();
    db.commit();
    // let c = db.add_host("chain://localhost:12345");
    let c = db.len_host();
    log::info!("left c: {}",c);

    
    for h in "/tmp/test.db".db_in().search_host("local"){
        println!("{}", h);
    }
}